home *** CD-ROM | disk | FTP | other *** search
- /* Tutorial MC Demonstration Program */
- /* ©FaceWare 1993-94. All Rights Reserved. */
-
- #include <string.h>
- #include "FaceStorMC.h"
- extern struct FaceRec fRec;
-
- short theFlag,theListItem,theMenuItem;
- char theString[32];
-
- void main()
- {
- strcpy(fRec.uName, "Tutorial.Rsrc");
- FaceIt(0,DoInit,0,0,0,0);
- theFlag = 0;
- theListItem = 3;
- theMenuItem = 2;
- strcpy(theString,"Hello");
- for (;;) {
- FaceIt(0,DoLoop,0,0,0,0);
- if ((fRec.uMenuID == 105)&&(fRec.uMenuItem == 1))
- {
- FaceIt(0,NewWnd,1010,0,0,0);
- FaceIt(0,GetCtl,1010,0,1,3);
- FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theFlag,2,0);
- FaceIt(0,GetCtl,1010,0,1,4);
- FaceIt(0,LnkCtl,(long)fRec.cControl,(long)theString,-31,0);
- FaceIt(0,GetCtl,1010,0,1,5);
- FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theListItem,2,0);
- FaceIt(0,GetCtl,1010,0,1,6);
- FaceIt(0,LnkCtl,(long)fRec.cControl,(long)&theMenuItem,2,0);
- FaceIt(0,SetVal,1010,0,0,0);
- for (;;) {
- FaceIt(0,MdlWnd,1010,0,0,0);
- if (fRec.uMenuID == 1010) {
- if (fRec.wcHit == -1)
- break;
- else if (fRec.wcHit == 1) {
- FaceIt(0,GetVal,1010,0,0,0);
- break;
- }
- else if (fRec.wcHit == 2) {
- FaceIt(0,GetCtl,1010,0,1,8);
- strcpy(fRec.uString,"Run button was hit.");
- FaceIt(fRec.cControl,1565,2,0,0,0);
- }
- }
- }
- FaceIt(0,EndWnd,1010,0,0,0);
- }
- }
- }